package cn.wolfcode.crm.domain;

import com.alibaba.fastjson.JSON;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.math.BigDecimal;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;

@Setter
@Getter
@ToString
public class Buyrecord {
    private Long id;

    private Date inputTime;

    private Customer customer;

    private SystemDictionaryItem course;

    private BigDecimal money;
    public String getJsonData(){
        Map<String, Object> map = new HashMap<>();
        map.put("id", id);
        map.put("customerId", customer.getId());
        map.put("courseId", course.getId());
        map.put("money", money);
        return JSON.toJSON(map).toString();
    }

}